package com.theanh.RssActivity.util;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class ImageView extends View {
	private String TAG = "Image View";
	private Bitmap bitmap;
	public ImageView(Context context ,Bundle extras){
		super(context);
		
	}

	@Override
	protected void onDraw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.onDraw(canvas);
		canvas.drawBitmap(bitmap, 0	,0,null);
	}
	
	public void loadImage(int resourceImage){
		try{
			bitmap = BitmapFactory.decodeResource(getResources(), resourceImage);
		}catch(Exception ex){
			//TODO show message 
			Log.i(TAG,ex.toString());
		}
		
	}
}